Conditions | 3 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | function trim(str) { |
||
15 | function Response(xhr, error, success) { |
||
16 | if (!isJson(xhr.responseText)) { |
||
17 | console.error('Response give not JSON Data'); |
||
18 | // alert('Response give not JSON Data'); |
||
19 | console.log(xhr.responseText); |
||
|
|||
20 | return false; |
||
21 | } |
||
22 | var data = JSON.parse(xhr.responseText); |
||
23 | if (xhr.readyState == 4 && xhr.status == "200") { |
||
24 | // console.table(data); |
||
25 | success(data, xhr); |
||
26 | } else { |
||
27 | // console.error(data); |
||
28 | error(data, xhr); |
||
29 | } |
||
30 | }; |
||
31 |